package com.lanxiaoye.shoppingSystem.dao;

import com.lanxiaoye.shoppingSystem.common.exception.BaseException;
import com.lanxiaoye.shoppingSystem.common.exception.EmptyException;
import com.lanxiaoye.shoppingSystem.entity.User;
import org.apache.ibatis.annotations.Param;

public interface UserMapper {
    int deleteByPrimaryKey(Integer userId);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer userId);

    User selectByName(String name);

    User selectByPhone(String phone);

    User selectByEmail(String email);

    User selectByPassword(@Param("name") String name, @Param("password") String password);

    int updateByPhoneSelective(User record);

    int updateByPrimaryKey(User record);

    int checkByName(String name);

    int checkByPhone(String phone);

    int checkByEmail(String email);

}